<?php
/* This file is part of a copyrighted work; it is distributed with NO WARRANTY.
 * See the file COPYRIGHT.html for more details.
 */
 
  require_once("../shared/common.php");
  session_cache_limiter(null);

  $tab = "school";
  $restrictToMbrAuth = TRUE;
  $nav = "edit_section";
  $focus_form_name = "editSectionform";
  $focus_form_field = "name";
  require_once("../functions/inputFuncs.php");
  require_once("../shared/logincheck.php");

  require_once("../classes/Section.php");
  require_once("../classes/SectionQuery.php");

  if (isset($_GET["sectionid"])){
    $sectionid = $_GET["sectionid"];
  } else {
    require("../shared/get_form_vars.php");
    $sectionid = $postVars["sectionid"];
  }
  $sectionQ = new SectionQuery();
  $sectionQ->connect();
  $section = $sectionQ->get($sectionid);
  $sectionQ->close();
  require_once("../shared/header.php");
  require_once("../classes/Localize.php");
  $loc = new Localize(OBIB_LOCALE,$tab);
  $headerWording = $loc->getText("mbrEditForm");

  $cancelLocation = "../school/school_view.php?schoolid=".$section->getSchoolId()."&reset=Y";
?>

<form name="editMbrform" method="POST" action="../school/section_edit.php">
<input type="hidden" name="sectionid" value="<?php echo H($sectionid);?>">
<input type="hidden" name="schoolid" value="<?php echo H($section->getSchoolId());?>">
<?php include("../school/section_fields.php"); ?>
<?php include("../shared/footer.php"); ?>
